/**
 * @author Usuario
 */

flymail.app.Core = function(){
	var menubar,
		statusbar = null; 
	
	var init = function(){
		Ext.BLANK_IMAGE_URL = 'js/lib/ext/3-0-0/resources/images/default/s.gif';
		Ext.QuickTips.init();
		
		menubar = new flymail.app.ui.MenuBar();
		statusbar = new flymail.app.ui.StatusBar();
		navpane = new flymail.app.ui.NavigationPane();
		maillist = new flymail.app.ui.MailList({ region: 'north' });
		
		buildLayout();
	}
	
	var buildLayout = function(){
		new Ext.Viewport({
			layout: 'border',
			items: [{
				region: 'center',
				layout: 'border',
				tbar: menubar,
				bbar: statusbar,
				items: [
					navpane, { 
						id: 'content',
						region:'center',
						layout: 'border',
						bodyStyle: { border: 'none' },
						margins: '5 5 5 0',
						items: [ maillist, {
							region: 'center',
							html: 'center'
						}]
					}
				]
			}],
		});
	};
	
	return {
		init: function(){
			init();
		}
	}
}();

/*
flymail.app.Core = function(){
	// private
	var buildUI = function() {
		new Ext.Viewport({
			layout: 'border',
			items: [{		
				region: 'center',							
				layout: 'border',
				items: [{
					region: 'west',					
					layout: 'border',
					width: 500,
					minSize: 400,
					maxSize: 500,
					border: false,
					split: true,
					items: [{
						region: 'west',
						collapsible: true,
						split: true,
						margins: '4 0 4 4',
						cmargins: '4',
						width: 150,
						minSize: 150,
						maxSize: 300,
						xtype: 'fm_navpane'
					},{
						region: 'center',
						margins: '4 0 4 0',
						xtype: 'fm_maillist'
					}]					
				},{
					region: 'center',
					margins: '4 4 4 0',
					html: 'Center - Reading Pane'
				}],
				tbar: { xtype: 'fm_menubar' },
				bbar: { xtype: 'fm_statusbar' }
			}]
		});
	};
	
	// public
	return {
		init: function(){
			buildUI();
		}
	}
}();
*/
